GXSetShapePoints
You can use theGXSetShapePoints
procedure to replace geometric points of a shape.
void GXSetShapePoints(gxShape target, long index, long count, const gxPoint data[]);
target
- A reference to the shape containing the geometric points you want to replace.
index
- The geometry index of the first geometric point to replace.
count
- The number of the geometric points to replace.
data
- An array of new geometric points.
DESCRIPTION
TheGXSetShapePoints
function changes the values of the number of geometric points specified in thecount
parameter, starting with the geometric point indicated by theindex
parameter, to the values specified by thedata
parameter.Notice that this function replaces geometric points on a point-by-point basis; the number of points in the
data
parameter must match the value of thecount
parameter. You may not use thegxSelectToEnd
constant for thecount
parameter.If you provide an empty or full shape for the source shape, this function posts the error
graphic_type_does_not_contain_points
.If you provide a source shape that is not one of the geometric shape types, this function performs the actions described in the following table:
Shape type Action taken bitmap Sets bitmap position picture Posts the error graphic_type_does_not_contain_points
text Sets position of text shape glyph Sets glyph positions corresponding to range indicated by the index
andcount
parameterslayout Sets position of layout shape ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil index_is_less_than_one (debugging version) count_is_less_than_one (debugging version) graphic_type_does_not_contain_points (debugging version) shape_access_not_allowed (debugging version) Warnings index_out_of_range_in_contour count_out_of_range SEE ALSO
For examples that use this function, see "Replacing Geometric Points" beginning on page 2-79.For a discussion of geometric points, see the section "Shape Geometry" beginning on page 2-9.
To learn how this function works for typographic shape types, see Inside Macintosh: QuickDraw GX Typography.
To determine the geometry index of a particular geometric point within a shape, use the
GXGetShapeIndex
function, which is described on page 2-139.To obtain a copy of a range of geometric points in a geometry, use the
GXGetShapePoints
function, which is described on page 2-140.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help